﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yubis.Data;
using Yubis.Data.SqlServer;

namespace Yubis.Framework.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            // Setup Test
            ISetup setup = new Setup("malicanli-nb\\sqlexpress", "Rivosem");
            setup.DeleteDatabase();
            setup.Run();

            ILanguage language = new Language();
            language.SetDefaultLanguage(1033);

            // Choice Field Test
            IFieldChoice gender = new FieldChoice("Gender");
            gender.Create();

            List<FieldChoiceData> data = new List<FieldChoiceData>();

            FieldChoiceData dataItem = null;

            dataItem = new FieldChoiceData();
            dataItem.Id = Guid.NewGuid();
            dataItem.Order = 1;
            dataItem.RecordType = RecordType.New;
            dataItem.Labels.Add(1033, "Male");
            dataItem.Labels.Add(1055, "Erkek");
            data.Add(dataItem);

            dataItem = new FieldChoiceData();
            dataItem.Id = Guid.NewGuid();
            dataItem.Order = 2;
            dataItem.RecordType = RecordType.New;
            dataItem.Labels.Add(1033, "Female");
            dataItem.Labels.Add(1055, "Bayan");
            data.Add(dataItem);

            //dataItem = new FieldChoiceData();
            //Guid tempId = Guid.NewGuid();
            //dataItem.Id = tempId;
            //dataItem.Order = 3;
            //dataItem.RecordType = RecordType.New;
            //dataItem.Labels.Add(1033, "Shemale");
            //dataItem.Labels.Add(1055, "Transeksuel");
            //data.Add(dataItem);

            //dataItem = new FieldChoiceData();
            //dataItem.Id = tempId;
            //dataItem.RecordType = RecordType.Delete;
            //data.Add(dataItem);

            //dataItem = new FieldChoiceData();
            //dataItem.Id = tempId;
            //dataItem.Order = 2;
            //dataItem.RecordType = RecordType.Update;
            //dataItem.Labels.Add(1033, "She-Male");
            //data.Add(dataItem);

            gender.SaveData(data);
            gender.GetData(1033);

            // Multilevel Field Test

            IFieldMultiLevel vehicle = new FieldMultiLevel("Vehicle");
            vehicle.Create();


        }
    }
}
